package kr.co.coffee247soft.main;

import kr.co.coffee247soft.R;
import kr.co.coffee247soft.SuperActivity;
import kr.co.coffee247soft.SuperInterface;
import kr.co.coffee247soft.cafe.CafeActivity;
import kr.co.coffee247soft.nearCafe.NearCafeActivity;
import kr.co.coffee247soft.setting.SettingActivity;
import kr.co.coffee247soft.stats.StatsActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class MainActivity extends SuperActivity implements SuperInterface
{
	View btnCafeList;
	View btnNearCafe;
	View btnStats;
	View btnSetting;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) 
	{
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.main_activity);
		
		setFindView();
		setDataSetting();
		setClickListener();
		
	}

	@Override
	public void setFindView() 
	{
		btnCafeList = (View) findViewById(R.id.main_btnCafeList);
		btnNearCafe = (View) findViewById(R.id.main_btnNearCafe);
		btnStats = (View) findViewById(R.id.main_btnStats);
		btnSetting = (View) findViewById(R.id.main_btnSetting);
	}

	@Override
	public void setDataSetting() 
	{
		
	}

	@Override
	public void setClickListener() {
		
		btnCafeList.setOnClickListener(new OnClickListener() 
		{
			@Override
			public void onClick(View arg0) 
			{
				Intent intent = new Intent(superContext, CafeActivity.class);
				startActivity(intent);
			}
		});
		
		btnNearCafe.setOnClickListener(new OnClickListener() 
		{
			@Override
			public void onClick(View arg0) 
			{
				Intent intent = new Intent(superContext, NearCafeActivity.class);
				startActivity(intent);
			}
		});
		
		btnStats.setOnClickListener(new OnClickListener() 
		{
			@Override
			public void onClick(View arg0) 
			{
				Intent intent = new Intent(superContext, StatsActivity.class);
				startActivity(intent);
			}
		});
		
		btnSetting.setOnClickListener(new OnClickListener() 
		{
			@Override
			public void onClick(View arg0) 
			{
				Intent intent = new Intent(superContext, SettingActivity.class);
				startActivity(intent);
			}
		});
		
	}
}
